/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.rongda.deploy.operation.deploy.pojo;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author zhanghouying
 * @date 2019-08-24
 */
@Getter
@Setter
public class App implements Serializable {

    private Long id;

    private String name;

    private int port;
    /**
     * 上传路径
     */
    private String uploadPath;
    /**
     * 部署路径
     */
    private String deployPath;
    /**
     * 备份路径
     */
    private String backupPath;
    /**
     * 启动脚本
     */
    private String startScript;
    /**
     * 部署脚本
     */
    private String deployScript;

    private Long serverId;

    private Integer status;
    public void copy(App source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
